﻿const { Sequelize, DataTypes, Model } = require('sequelize')
const sequelize = new Sequelize('vcenter', 'szkitm', 'kingsware', {
  host: '192.168.0.201',
  port: 1521,
  dialect: 'oracle' /* 选择 'mysql' | 'mariadb' | 'postgres' | 'mssql' 其一 */
})


//
;(async function () {
  await sequelize.authenticate()
  console.log('Connection has been established successfully.')

  // SELECT * FROM TEST0208 t
  const result = await sequelize.query('SELECT * FROM TEST0208 t')
  console.log(result)

  // 关闭
  sequelize.close()
})()
